package com.liankuan.console.service;

import com.liankuan.console.controller.vo.StrategyListVO;
import com.liankuan.console.controller.vo.StrategyOtherVO.StrategyInfoVO;
import com.liankuan.console.controller.vo.StrategyVO;
import com.liankuan.console.controller.vo.request.*;
import com.liankuan.console.controller.vo.request.Strategy.SaveStrategyIO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

public interface StrategyService {
    List<StrategyListVO> findAll();

    StrategyVO findOne(int id);

    StrategyInfoVO findOne(String params);

    void updateStrategyState(int id, int state);

    void restartStrategyState(int id,int state);

    void save(StrategyVO strategyVO);

    void updateExchange(StrategyExchangeIO strategyExchangeIO);

    void updateStrategyBasic(StrategyBasicIO strategyBasicIO);

    void updateStrategyConfig(StrategyConfigIO strategyConfigIO);

    HashMap getStrategyLogInfo(StrategyLogIO strategyLogIO);

    void deleteExchange(int strategyId, int exchangeId);

    StrategyAddExchangeVO finAllExchange(int strategyId);

    void saveStrategy(SaveStrategyIO saveStrategyIO);
    void saveStrategy(SaveStrategyIO saveStrategyIO,int userId);

    void deleteStrategy(Integer id);

    HashMap getNewLogInfo(Integer strategyId, Integer lastLineNumber);

    HashMap getProfitLog(StrategyLogIO strategyLogIO);

    HashMap getNewProfitLog(Integer strategyId, Integer lastLineNumber);

    void updateJar(Integer strategyId);

    StringBuilder getOrmData(Integer strategyId);

    Boolean hasStrategyName(String name);

    List<StrategyListVO> findAllByUserId(int userId);

    StrategyAddExchangeVO finAllExchange(Integer strategyId, Integer userId);

    Integer getUserStrategyLevel(Integer strategyId,Integer userId);

    void downloadFile(HttpServletRequest request, HttpServletResponse response, Integer strategyId);
}
